#ifndef _THREAD_FUNC_WORK_HPP_
#define _THREAD_FUNC_WORK_HPP_

#include <iostream>
#include <vector>

#include "definitions.hpp"
#include "misc.hpp"
#include "config.hpp"
#include "scene.hpp"
#include "color.hpp"
#include "Camera.hpp"

class ThreadFuncWork
{
private:
    Task_t      _task;
    Result_t    _result;

    Camera     *_camera_ptr;
    Scene      *_scene_ptr;

    int         _nIntersections;

    void processRay( Ray & ray );
    void processData();

    bool isShadowed( Vector & hit_point, Ray & from_light_to_hit_point, uint i, int primID);
public:
    void operator() ();
    void Init( Task_t & task, Scene & scene, Camera & camera );
    ///////////
    ThreadFuncWork( Task_t & task, Scene & scene, Camera & camera );
    ThreadFuncWork();

    
    ~ThreadFuncWork();
};

#endif //_THREAD_FUNC_WORK_HPP_
